package com.llbnk.springcoding.service;


import com.llbnk.springcoding.dao.UserDao;
import com.llbnk.springcoding.mapper.user_info.UserMapper;
import com.llbnk.springcoding.mapper.user_info_core.UserInfoMapper;
import com.llbnk.springcoding.pojo.User;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
@Slf4j
public class UserService {

    @Autowired
    private UserMapper userMapper;

    @Autowired
    private UserInfoMapper userInfoMapper;

    @Autowired
    private UserDao userDao;

    public User testUserInfoById(Long userId) {
        return userMapper.selectByUserId(userId);
    }

    public String testAddNewUser(User user) {
        //其他逻辑处理
        userDao.insert(user);
        return "success";
    }

    public User testUserById(Long userId) {
        //其他逻辑处理
        return userDao.selectByUserId(userId);
    }

}
